package com.magold.event;

import org.andengine.engine.camera.Camera;
import org.andengine.entity.IEntity;


public class VisibleCondition implements EventCondition {
	private Camera mCamera;
	private IEntity mEntity;
	
	public VisibleCondition(Camera pCamera, IEntity pEntity) {
		mCamera = pCamera;
		mEntity = pEntity;
	}
	
	@Override
	public boolean isMatched() {
		return !mEntity.isCulled(mCamera);
	}

}
